package org.jeecg.modules.geo.core.query;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.SpringContextHolder;
import org.jeecg.modules.geo.service.IBimGeoAppService;

import java.util.List;
import java.util.Map;

public class BimGeoQueryGenerator {

    private static final IBimGeoAppService bimGeoAppService = SpringContextHolder.getBean(IBimGeoAppService.class);

    public static <T> QueryWrapper<T> initQueryWrapper(T searchObj, Map<String, String[]> parameterMap){
        QueryWrapper<T> queryWrapper = QueryGenerator.initQueryWrapper(searchObj, parameterMap);
        List<Integer> list = bimGeoAppService.allIdNotDelete();
        queryWrapper.in("app_id", list);
        return queryWrapper;
    }

}
